let Person=require('./person');
class Teacher extends Person{
    constructor(name,age,klass){
        super(name,age);
        this.klass=klass;
    }
    introduce(){
        if(this.klass === undefined){
            return super.introduce()+` I am a Teacher. I teach No Class.`;
        }
        else{
            return super.introduce()+` I am a Teacher. I teach Class ${this.klass}.`
        }
    }
}
module.exports = Teacher;
const teacher = new Teacher("Tom", 21, 2);
const introduce = teacher.introduce();
console.log(introduce);
